#-------------------------------------------------
#
# Project created by QtCreator 2013-11-16T15:14:05
#
#-------------------------------------------------

QT       += core gui xml

greaterThan(QT_MAJOR_VERSION, 4): QT += widgets

TARGET = abhidhaana

TEMPLATE = app
INCLUDEPATH += ../libabhidhaana

SOURCES += main.cpp\
        mainwindow.cpp \
        qmenubutton.cpp \ 
    aboutdialog.cpp \
    aboutabhidhaana.cpp \
    minitranslator.cpp

HEADERS  += mainwindow.h \
    qmenubutton.h \
    dictionaryinterface.h \
    aboutdialog.h \
    aboutabhidhaana.h \
    minitranslator.h

FORMS    += mainwindow.ui \
    aboutdialog.ui \
    aboutabhidhaana.ui \
    minitranslator.ui

RESOURCES += \
    resource.qrc


OTHER_FILES += \
    resources/style/abhidhaana.css \
    docs/aboutTransliteration.html \
    mac-deploy.sh




win32 {
  CONFIG(debug, release|debug) {
    LIBS+= ../libabhidhaana/debug/libabhidhaanad.a
  } else {
    LIBS += ../libabhidhaana/release/libabhidhaana.a
  }
}

unix {
    macx {
        CONFIG(debug, release|debug) {
            LIBS+= ../libabhidhaana/libabhidhaana_debug.a
        } else {
            LIBS += ../libabhidhaana/libabhidhaana.a
        }
    } else {
        LIBS += -L../libabhidhaana -labhidhaana
    }
}

DESTDIR = ../dist



win32 {
    RC_FILE = win32icon.rc
}

macx {
    ICON = resources/pics/icon.icns
}



macx {
    copyfiles.commands += rm -rf ../dist/mac-deploy.sh;
    copyfiles.commands += cp -rf $$PWD/mac-deploy.sh ../dist;
}

QMAKE_EXTRA_TARGETS += copyfiles
POST_TARGETDEPS += copyfiles

unix {
  isEmpty(PREFIX) {
    PREFIX = /usr
  }
  BINDIR = $$PREFIX/share/abhidhaana
  DATADIR =$$PREFIX/share

  #MAKE INSTALL

  INSTALLS += target desktop icon pluginheaders pkgconfig

  target.path =$$BINDIR

  desktop.path = $$DATADIR/applications
  desktop.files += $${TARGET}.desktop

  icon.path = $$DATADIR/abhidhaana
  icon.files += resources/pics/icon.png

  pluginheaders.files += dictionaryinterface.h
  pluginheaders.path = $$PREFIX/include/abhidhaana

  pkgconfig.files += abhidhaana-plugins-1.0.pc
  pkgconfig.path = $$PREFIX/lib/pkgconfig
}
